package com.bwie.auth.controller;

import com.bwie.auth.service.AuthService;
import com.bwie.common.domain.Admin;
import com.bwie.common.domain.response.JwtResponse;
import com.bwie.common.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author：贾维斯
 * @Description: 描述
 * @name：AuthController
 * @Date：2024/11/4 9:30
 */
@RestController
@RequestMapping("/login")
public class AuthController {
    @Autowired
    private AuthService authService;

    @PostMapping("/selectAdmin")
    public Result<JwtResponse> selectAdmin(@RequestBody Admin admin) {
        return authService.selectAdmin(admin);
    }

    @GetMapping("/getInfo")
    public Admin getInfo() {
        return authService.getInfo();
    }
}
